﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Viz
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();

            this.KeyDown += new KeyEventHandler(MainPage_KeyDown);
        }

        void MainPage_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Add)
            {
                tri.Near();
            }
            else if (e.Key == Key.Subtract)
            {
                tri.Far();
            }
            else if (e.Key == Key.Left)
            {
                tri.Left();
            }
            else if (e.Key == Key.Right)
            {
                tri.Right();
            }
            else if (e.Key == Key.Up)
            {
                tri.Up();
            }
            else if (e.Key == Key.Down)
            {
                tri.Down();
            }
            else if (e.Key == Key.L)
            {
                tri.LightUp();
            }
            else if (e.Key == Key.D)
            {
                tri.LightDown();
            }

        }
    }
}
